<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>margin 外边距</title>
    <style type="text\css">
            *{
                margin: 0;
                padding: 0;
            }
            ul{ 
                list-style: none;
                width: 300px;
                height: 400px;
                
            }
            li{
                width: 200px;
                height: 50px;
                background-color: yellow;
            }
            #div1{ 
                width: 300px;
                height: 400px;
                background-color: pink;
                margin: 40px auto;
                text-align: center;
                overflow: scroll;
                outline: auto;
                border: 1px solid red;
                
            }
            #div2{
                width: 300px;
                height: 400px;
                background-color: yellow;
                margin:   30px;
                border: 1px solid red;

            }
    
    </style>
</head>
<body>
    
     <div id="div1">
        <div id="div2">
            <ul>
                <li>HTML</li>
                <li>CSS</li>
                <li>JavaScript</li>
            </ul>
        </div>
     </div>
</body>
</html>